home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / catstuf2.sit / CatStuff v2.0 / card_3746.txt < prev    next >
Text File  |  1990-05-28  |  15KB  |  204 lines

  1. -- card: 3746 from stack: in.0
  2. -- bmap block id: 2154
  3. -- flags: 4000
  4. -- background id: 2582
  5. -- name: Help
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   set scroll of card field "Help/Info Text" to 0
  9. end closeCard
  10.  
  11.  
  12. -- part 4 (button)
  13. -- low flags: 00
  14. -- high flags: A004
  15. -- rect: left=339 top=279 right=336 bottom=396
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 1000 / 1000
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: Update
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   answer "Really update (see help)?" with "Ok" or "Cancel"
  27.   if it is "Ok" then
  28.     put second word of the long name of this stack into tcs
  29.     put char 2 to (length(tcs)-1) of tcs into tcs
  30.     lock screen
  31.     push card
  32.     doMenu "Open Stack..."
  33.     put second word of the long name of this stack into ocs
  34.     put char 2 to (length(ocs)-1) of ocs into ocs
  35.     if ocs = tcs then
  36.       pop card
  37.       unlock screen
  38.       exit mouseUp
  39.     end if
  40.     repeat with num = 1 to the number of cards in background "Main"
  41.       set cursor to busy
  42.       go to card num of background "Main" of stack ocs
  43.       set cursor to busy
  44.       put field "Label" into a
  45.       put field "Box" into b
  46.       put field "Name" into c
  47.       put field "Free" into d
  48.       put field "Size" into e
  49.       put field "Date" into f
  50.       put field "Catalog" into g
  51.       set cursor to busy
  52.       go to last card of background "Main" of stack tcs
  53.       doMenu "New Card"
  54.       set cursor to busy
  55.       put a into field "Label"
  56.       put b into field "Box"
  57.       put c into field "Name"
  58.       put d into field "Free"
  59.       put e into field "Size"
  60.       put f into field "Date"
  61.       put g into field "Catalog"
  62.     end repeat
  63.     pop card
  64.     set cursor to hand
  65.     unlock screen
  66.   end if
  67. end mouseUp
  68.  
  69.  
  70.  
  71. -- part 1 (button)
  72. -- low flags: 00
  73. -- high flags: 2004
  74. -- rect: left=394 top=279 right=336 bottom=451
  75. -- title width / last selected line: 0
  76. -- icon id / first selected line: 20098 / 20098
  77. -- text alignment: 1
  78. -- font id: 0
  79. -- text size: 12
  80. -- style flags: 0
  81. -- line height: 16
  82. -- part name: Home
  83. ----- HyperTalk script -----
  84. on mouseUp
  85.   if the commandkey is up then
  86.     go home
  87.   else
  88.     doMenu "Open Stack..."
  89.   end if
  90. end mouseUp
  91.  
  92.  
  93.  
  94. -- part 2 (button)
  95. -- low flags: 00
  96. -- high flags: 2004
  97. -- rect: left=449 top=279 right=336 bottom=506
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 29114 / 29114
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: Return
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   set scroll of card field "Help/Info Text" to 0
  109.   pop card
  110. end mouseUp
  111.  
  112.  
  113.  
  114. -- part 3 (field)
  115. -- low flags: 01
  116. -- high flags: 2007
  117. -- rect: left=5 top=39 right=273 bottom=505
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 0
  121. -- font id: 3
  122. -- text size: 9
  123. -- style flags: 0
  124. -- line height: 12
  125. -- part name: Help/Info Text
  126.  
  127.  
  128. -- part contents for card part 3
  129. ----- text -----
  130.  
  131. The CatStuff Stack v2.0  by  John B. Lockhart
  132.  
  133.  
  134. Requires
  135.  
  136.      This stack was written on a Macintosh IIcx under System 6.0.4 (with the included version of HyperCard).  It should run on most systems under the latest version of the System.  If you attempt to run it on a Lisa or without HFS, donΓÇÖt expect it to work.  I take no responsibility if this stack lays waste to your disks or system; you should use good sense and try it out on write-protected or expendable disks first.  (Hey!  ItΓÇÖs free!  Stop grumbling!)  For best results, have the Geneva 9 point font (required) and the Monaco 9 point font (optional?) in your System file.
  137.  
  138.  
  139. WhatΓÇÖs New in Version 2.0
  140.  
  141.      Version 2.0 supports Compactor files.  If youΓÇÖre screaming that you donΓÇÖt want to use Version 2.0 because youΓÇÖve read 50 disks into Version 1.0 and donΓÇÖt feel like re-cataloging them, I donΓÇÖt blame you.  Look below this text.  There is a new button called ΓÇ£Update,ΓÇ¥ expressly for the purpose of copying your disk info from CatStuff Version 1.0 to this stack.  Simply click on Update, select your old CatStuff stack, and wait a few days.  It may be slow, but it beats re-cataloging 50 disks.  The Update button copies all of your old cards into new cards in this stack, so make sure that (a) youΓÇÖve got lots of room on whatever disk youΓÇÖre working and (b) that you select the CatStuff Version 1.0 stack, lest it try to copy the phone number of your business contact in Guam from the Address stack into this stack.  Afterwards you can delete Version 1.0.
  142.  
  143.  
  144. Description/How to Use
  145.  
  146.      CatStuff is a stack designed to keep track of all the files on all of your floppy disks.  Like many others of its kind, CatStuff has the ability to read a disk catalog directly into HyperCard from a recently inserted disk.  The principal difference between CatStuff and other stacks similar to it is that CatStuff treats StuffIt and Compactor archive files as folders:  Everything within a StuffIt or Compactor file on a disk is listed in the catalog, including multiple sub-folders.  (Compactor auto-extracting applications are also expanded.)
  147.      The CatStuff data card contains several fields and buttons to contain and manipulate the information stored in the stack.  All fields in the stack are filled for you except for the Disk Box and Disk Label fields, which you may fill with the name of the disk box the disk is in and its label (see the Disk Labeling section).  Please note that the Disk Size field is only accurate within several K of the actual disk size.  The Free Space field is accurate to within one K of the actual amount of free space on the volume.
  148.      The most important button is the New Card button.  This button creates a new card, then prompts you to insert a disk.  If a disk is in the external drive or internal drive (in that order), it is ejected.  Remember also that Command-Shift-1 and Command-Shift-2 eject disks as always, should you want to remove a disk before the read procedure.  After the disk is read, the various fields in the card are filled with information from the disk.  Command-clicking on the New Card button will allow multiple-disk reads; after each disk is read, a new card is created and you are prompted to insert a disk.  The multiple-read function prompts you for the disk box name, as well as whether youΓÇÖd like to number the disk labels (and from what starting number) or enter them yourself.  The Read Disk button is similar to the New Card button,  but overwrites information on the existing card instead of creating a new card.
  149.      The Sort button allows you to sort by certain fields; when sorting by the Label field you will be given further options, discussed below.  The Find button allows you to search the various cards in various ways.  Note:  To repeat searching, simply use RETURN after the first instance of what youΓÇÖre searching for has been found, just as you normally would with the HyperCard find command.  Eventually CatStuff will tell you no more instances can be found.
  150.      The Delete Card option is obvious enough, but if you Command-click on it, it will ask if you wish to remove all cards from the stack.  This is dangerous, but allows you to start over with a clean slate.  Please do this to the stack if you give a copy to a friend after loading it with your own files; it reduces stack size enormously.  The Home button will launch another stack if Command-clicked; otherwise it takes you to the home stack.
  151.  
  152.  
  153. Disk Labeling
  154.  
  155.      If youΓÇÖre like me, then you have about 100 disks labeled ΓÇ£Misc,ΓÇ¥ and were serious when you labeled them.  In The Search for the Better Way I have found a method which works:  Label each ΓÇ£MiscΓÇ¥ disk in a box sequentially with a number and then use this stack, placing the number on the label in the Disk Label field.  When youΓÇÖre looking for a file, simply search for it by name in the stack, cross-reference with the number, then flip to that number in your disk box.  The sort button allows you to sort both numerically and alphabetically for this purpose.  (Some of you might want to letter your disks...)
  156.  
  157.  
  158. The Catalog Field
  159.  
  160.      The catalog field displays each file on the disk in alphabetical order, with the associated file type and creator strings, and each filesΓÇÖ size in K (rounded up; a 7-byte file is shown as 1K).  If a filename, type, or creator string contains control characters, they are replaced with bullets.  If a subdirectory or StuffIt/Compactor file is encountered, all of the files within that directory or file are listed again in alphabetical order, but indented one space.  Directories are indicated by the text ΓÇ£DirectoryΓÇ¥ where the file type/creator columns are.  Directories within StuffIt/Compactor files are treated identically to normal directories.  Archive files within archive files are merely listed; to show files within them would require the program to unpack the file, which is unreasonable.  (It isnΓÇÖt a good idea to keep archive files within archive files anywayΓÇöit wastes space and makes life difficult.)
  161.  
  162.  
  163. Reasons for This Stack
  164.  
  165.      1.  Like I said, IΓÇÖve got 100 disks labeled ΓÇ£Misc.ΓÇ¥
  166.      2.  If youΓÇÖve looked at the other stacks, youΓÇÖll notice that not one has the option to catalog StuffIt/Compactor archives.  My 100 disks are littered with StuffIt archives (try to find a Mac BBS which DOESNΓÇÖT use StuffIt), and the other stacks just donΓÇÖt help when they list one lonely file on the disk, such as ΓÇ£Misc. programsΓÇ¥ (a StuffIt archive), which may be filled with fifty files.
  167.      3.  Another gripe of mine about many other stacks is that they use multiple fields for the catalog data.  While this allows you to have a nice proportionally spaced font, it also means you have to scroll all of those fields at the same time.  This is SLOW.  Very slow.  Which is not their fault (right Bill?), but is nevertheless irritating.  I use only one field with a monospaced font to keep nice columns, and the scrolling rate is much more tolerable.  (Users for turbo-intercooled HyperTalk!)
  168.      4.  I wanted to write an XFCN.  (ΓÇ£What??ΓÇ¥)  Ok, I wanted to HAVE my own XFCN.  IΓÇÖve seen one too many stack which uses Oscar F. HillsΓÇÖ ReadCat XCMD.  This is not to say that his XCMD isnΓÇÖt good (It inspired me to write this!), but he DID write a cataloging stack to go along with HIS XCMD, and other stacks offering ΓÇ£improvementsΓÇ¥ should have worked on the XCMD itself, the heart of the matter.
  169.  
  170.  
  171. Credits
  172.  
  173.      I must give sincere thanks to Rob Gibson, author of the excellent WhereSIT program (get it, it really is useful).  While I was writing the CatStuff XFCN, it occured to me that I honestly didnΓÇÖt know how a StuffIt file was encoded.  It was then I recalled that the author of WhereSIT would HAVE to know how they were encoded, so I looked him up and sent him e-mail (Raymond Lau is unavailable electronically, to the best of my knowledge.).  To my surprise (a) the NEXT DAY I received a letter from him, explaining that (b) the StuffIt format was outlined in the StuffIt documentation (Which I didnΓÇÖt have or hadnΓÇÖt read. Honest!), and (c) accompanied by that section of the documentation.  Within a day IΓÇÖd added that to my XFCN.
  174.      Further thanks to Bill Goodman, author of Compactor.  I downloaded Compactor and noted that it packed more efficiently and quickly than StuffIt, so I wanted to have CatStuff support Compactor files.  I immediately wrote the author, and again was surprised to get a response the next day containing the specs. for the Compactor file format.  CatStuff version 2.0 was the result.  I highly recommend Compactor; I was impressed by virtually everything about it, especially the fact that the distribution package (which unpacked itself!) was SMALLER than the simple (non-unpacking) StuffIt archive containing the same files. 
  175.      Thanks also goes to Raymond Lau for (the virtually standardized) StuffIt.  While IΓÇÖm dishing out thanks, I cannot fail to mention Oscar F. Hills again, the man who started it all (to my knowledge) with AutoCat.
  176.  
  177.  
  178. Freeware
  179.  
  180.      Yes, this stack is freeware.  You may distribute it freely.  Freely.  DonΓÇÖt even ask 5 and a half cents for it.  Or IΓÇÖll sue you for ownership rights of your firstborn.  You may also use my CatStuff XFCN in other stacks (sigh), but for heavenΓÇÖs sake do IMPROVE on this stack if you do.  Or write your own XFCN.  In doing so youΓÇÖll realize why people like me are so protective over their XFCNs.  They can truly be a pain to write.  In any case, youΓÇÖll note that IΓÇÖve plastered my name over the XFCN window, so youΓÇÖre forced to give me credit (as you should), wittingly or no.
  181.      This stack and its accompanying XFCN are Copyright ┬⌐ 1990.
  182.  
  183.  
  184. The CatStuff XFCN
  185.  
  186.      The CatStuff XFCN is very simple to use.  It takes no parameters, and returns a block of text containing the catalog if successful.  The first line of the block of text indicates the result of the operation; if it is not ΓÇ£OKΓÇ¥ then the catalog information is not returned.  If it is ΓÇ£OK,ΓÇ¥ then the next line contains the name of the volume.  The third line contains the size of the volume and free space on it in K, separated by commas.  The remainder of the text block is the disk catalog.  Look at the script of the ΓÇ£Read DiskΓÇ¥ button for an example on how to use the XFCN.  Note that there are NO associated resources with my XFCN; it is therefore only necessary to copy the XFCN itself to your stack to use it.
  187.  
  188.  
  189. Version History
  190.  
  191.      Version 2.0:  Added Compactor archive/auto-extracting file support.  Added ΓÇ£UpdateΓÇ¥ button in help (below).  Improved number handling in the XCMD (file sizes/free space are rounded to the next highest K).  Added auto-pre-ejecting of disks to XCMD.  Fixed bugs in and cleaned up the custom find routine.  Added a little color to the XFCN window (oooh-ahhh).
  192.      Version 1.0:  The first release; only StuffIt files supported.
  193.  
  194.  
  195. Future Versions?
  196.  
  197.      With any piece of software, inevitably, something (a) will be wrong, (b) can be done better, or (c) has been left out.  I catch many things, but not everything.  And I donΓÇÖt know if hundreds of people out there want pictures of pink elephants floating around their disk catalog stacks.  The point is, write me mail.  IΓÇÖll give what you say thought and IΓÇÖm certain to reply (failing acts of God, pink elephants stomping about my condo, et cetera).
  198.  
  199.  
  200. Contacting Me
  201.  
  202.      I can be contacted at:  J.LOCKHART1 on GEnie, and gt1439a@prism.gatech.edu on the InterNet.  Please note that CompuServe users CAN send mail to me at the InterNet address by prefixing the latter with ΓÇ£>INTERNET:ΓÇ¥ (>INTERNET:gt1439a@prism.gatech.edu).
  203.  
  204. Enjoy!